Application programs (hereafter, to be referred to simply as applications) developed for specific purposes of users are executed interactively through various message provided to the users. Usually, personal computers employ a human interface referred to as a GUI (Graphic User interface) so as to use icons, characters, graphic images, etc. denoting execute command and functions in processings concerning computers and facilitating users' understanding of the meanings and functions of those items intuitively.
An application, when it is operated under such an operating system (OS) as the Windows (a trademark of Microsoft Corp.) and OS/2 (a trademark of IBM Corp.), which supplies the GUI environment, uses the API Application Program Interface) included in a library of each of those operating systems so as to facilitate user display of input environments, input methods of commands, and data by means of characters and graphics on windows, as well as processing results, etc. And, since the system of distributing commodities for applications is expanding more and more throughout the world, opportunities to use applications developed by a national language in other language countries are increasing rapidly. Consequently, it has been strongly demanded that characters used in those applications corresponded to many national languages.
Usually, an application is created so as to match with the language of its employed operating system. For example, an operating system created in English displays the GUI messages in English. And accordingly, applications running on the OS are developed so as to display, messages in English. In addition, if an application calls an OS, the application sends a character string message to the OS and the OS determines the language type (English, Japanese, etc.), the size (full size, half size, etc.), the character font, etc. with respect to each character string and receives the message as a correct one only when the message agrees to a predetermined definition before executing the processing in some cases.
Assume now that a French person uses an application in English developed under an English OS. In this case, the character strings of the application should preferably be translated into French. This is because the French user could understand messages of the application displayed on the GUI environment if the messages appear in French rather than in English.
Usually, an application includes both code part describing instructions executed by a CPU and data part describing their parameters. One type of data included in such an application is referred to as a resource. A resource includes icons, cursors, menus, dialog boxes, characters of a specific language, etc. Such resources are used widely in the GUI, multi-media programs, etc.
When developing an application corresponding to many national languages, it would thus be convenient to divide the application into the main file and its subroutines, that is, resource files. Applications are described in a source code format in accordance with such a program language as Assembler, COBOL, FORTRAN, C/C++, PL1, etc. that can be understood by human beings.
A resource file includes character strings created in a specific language and in a specific format. Those character strings are used for messages provided to the GUI and the subject OS. If a source program created in a national language is to be translated into another national language, then character strings that are used for messages of the source code of the resource file are translated; the source code in the main file is not modified at all. Because the computer cannot understand any source codes, the source codes of both main file and resource file are compiled respectively into object codes. Then, libraries provided by the OS are assembled in the object codes as needed, thereby creating an executable program. Such object code is also referred to as the machine language represented by “0” and “1.”
The main file opens a resource file dynamically so as to provide character strings used for messages included in the resource file to the user through the GUI and/or provides the character strings directly to the OS. Consequently, if an attempt is made to translate messages of an application into another national language so as to operate the application, it is necessary to translate the character strings in the resource file described with a source code so as to prepare a resource file described in each national language, then compile the resource file again, thereby creating an executable program.
Published Unexamined Patent Application No. 10-116185 discloses a technique for creating such a resource file. In addition, U.S. Pat. No. 5,644,775 discloses a technique for separating the text part in an application from the program body, thereby registering it in a library so as to make it easier to translate messages into many national languages. A library includes character strings for displaying texts related to a plurality of applications and character strings related to a specific application.
If an application is created so as to support many national languages, the conventional method has to translate character strings equivalent to messages of the resource file described with the source code first, then compile the resource file so as to be combined with the main file and create an executable program, and finally verify the operation of the program. The developer of the application has therefore to create the application described with a source code as many as the number of the supported languages beforehand and compile each of those applications so as to convert it into an executable program comprising an object code before delivering the program. Consequently, if the program is requested to be translated into still another non-supported language after it is delivered, the developer has to update the source code of the program.
If an attempt is made to run an application program described in English under the control of an English language OS that supports Japanese fonts in Japan, it is naturally demanded that at least important messages should be displayed in Japanese. For example, a message for prompting the user to use an AC adapter when the residual capacity of the battery of his/her portable computer reaches the low level is important from the viewpoint of preventing loss of work data. In many cases, therefore, it has been demanded that at least such a message should be displayed in Japanese as long as the translation does not affect the program badly.
Furthermore, even under the control of the same OS language, if the OS version is upgraded, a problem often arises; the applications having been developed in accordance with the old OS do not run normally. Character strings in a resource file are used as messages to the OS. In some cases, therefore, even in applications developed under the control of a Japanese language OS, if the OS version is upgraded, such that, for example, the OS accepts messages described only with full-size characters at first and after the version-up, the OS is modified so as to accept messages described only with half-size characters. In such a case, the character strings in the resource file described with a source code must be described with half-size characters. And, in order to solve such a problem, there is a need that character strings can be modified easily without modifying any source codes of the main file and the resource file.
Under such circumstances, it is an object of the present invention to provide a method for creating a computer program, a program structure, and a recording medium which can be modified easily.
It is another object of the present invention to provide a method for creating a computer program, a program structure, and a recording medium that can modify character strings therein without modifying any source program.
It is still another object of the present invention to provide a method for creating a computer program, a program structure, and a recording medium that can modify character strings therein easily so as to cope with changes of languages and changes of program operation environments which may occur in a computer program that provides the GUI environment including display of character strings.